package com.aric.springbootmusic.entity.param;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UpdateUserPassWordParam {
    @NotBlank(message="id不能为空!")
    private String id;
    @NotBlank(message = "原密码不能为空!")
    @Size(min = 6,max = 13,message = "旧密码长度必须在6～13位")
    @Pattern(regexp="(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&+=])(?=\\S+$).{6,13}",message = "旧密码必须包含数字，大小写字母以及(_~!@#$%^&+=)括号中的任意一个字符")
    private String oldPassword;
    @NotBlank(message = "新密码不能为空!")
    @Size(min = 6,max = 13,message = "新密码长度必须在6～13位")
    @Pattern(regexp="(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&+=])(?=\\S+$).{6,13}",message = "新密码必须包含数字，大小写字母以及(_~!@#$%^&+=)括号中的任意一个字符")
    private String newPassword;
}
